﻿Ext.define('app.prm.synth.SynthController', {
    extend: 'Ext.app.ViewController',
    alias: 'controller.synth',
    init: function () {
        var me = this;
    },
    onAddSynth: function () {
        var view = this.getView();
        var win = Ext.create("app.prm.synth.CreateOrEdit", { title: '新增工艺路线', ProjectId: view.paramsId });
        win.on("savesuccess", function ()
        {
            view.reshPage();
            win.close();
        });
        win.show();
    },
    onInit: function (view) {
        App.AjaxGet('/api/services/app/permission/GetSynthPermissionOutPut?projectId=' + view.paramsId, function (data) {
            view.getViewModel().setData(data.result);
        });
        view.reshPage();
    }
});
